package com.lao.demo.strategymode.controller;

import com.google.gson.JsonObject;
import com.lao.demo.strategymode.service.JsapiFacadeImpl;
import com.lao.demo.strategymode.shulin.PeopleFactory;
import me.chanjar.weixin.common.bean.WxJsapiSignature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.net.URL;

/**
 * @Author: xuchao
 * @Description:
 * @Date: 2021/6/25 16:57
 */
@RestController
@RequestMapping("/jssdk")
public class WxController {
    @Autowired
    private static PeopleFactory people;
    @Autowired
    private JsapiFacadeImpl jsapiFacade;
    @GetMapping("/test")
    public void testStrategy(@RequestParam("url") String url){
        WxJsapiSignature jsapiSignature = jsapiFacade.createJsapiSignature(url);
        System.out.println(jsapiSignature.toString());
    }

}
